package com.deng.cloud.service;

import com.deng.cloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
@Service("service")
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT",fallbackFactory = DeptClientServiceFallbackFactory.class)
public interface DeptClientService {

    @RequestMapping("/dept/get/{id}")
    public Dept queryById(@PathVariable("id") Long id);

    @RequestMapping("/dept/list")
    public List<Dept> queryAll();

    @RequestMapping("/dept/add")
    public boolean addDept(Dept dept);

}
